package com.atguigu.designpattern.decorator;

public class CoffeeBar {

    public static void main(String[] args) {
        Drink order = new LongBlackCoffee();
        System.out.println("费用=" + order.getPrice());
        System.out.println("描述=" + order.getDes());

        order = new Milk(order);
        System.out.println("加入牛奶 费用=" + order.cost());
        System.out.println("加入牛奶 描述=" + order.getDes());

        order = new Chocolate(order);
        System.out.println("加入巧克力 费用=" + order.cost());
        System.out.println("加入巧克力 描述=" + order.getDes());

        order = new Chocolate(order);
        System.out.println("加入巧克力 费用=" + order.cost());
        System.out.println("加入巧克力 描述=" + order.getDes());
    }
}
